<?php

namespace app\common\model;

use think\Model;

/**
 * 表单提交模型
 */
class FormLogModel extends Model
{
    protected $table = 'ks_form_log';

    const ID = 'id';//id
    const PRODUCT = 'product';//咨询项目
    const REALNAME = 'realname';//姓名
    const PHONE = 'phone';//手机号
    const IP = 'ip';//操作ip
    const CREATE_TIME = 'create_time';//创建时间
    const IS_DELETE = 'is_delete';//删除状态
    const DELETE_TIME = 'delete_time';//删除时间


    protected $auto = ['ip'];

    public function setIpAttr($value)
    {
        return request()->ip();
    }

    public function setCreateTimeAttr($value)
    {
        return date('Y-m-d H:i:s');
    }

}
